package dp2;

public class TemplateClass {

	private Strategy strategy;

	public TemplateClass(Strategy strategy) {
		this.strategy = strategy;
	}
	
	public int templateMethod() {
		int a = strategy.operation1();
		int somme = 0;
		for (int i = 0; i < a; i++) {
			int b = strategy.operation2(); 
			somme += b;
		}
		return somme;
	}
}
